package com.zhipu.balance.ui.home.calculate.adapter

import android.view.ViewGroup
import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentManager
import androidx.fragment.app.FragmentPagerAdapter
import java.util.ArrayList

/**
 * 适配器
 */
class ProfitOrderAdapter(var mFragmentManager : FragmentManager,var mFragments : List<Fragment>) : FragmentPagerAdapter(mFragmentManager){


    /**
     * Return the number of views available.
     */
    override fun getCount(): Int {
        return mFragments.size
    }

    /**
     * Return the Fragment associated with a specified position.
     */
    override fun getItem(position: Int): Fragment {
        return mFragments[position]
    }

    override fun destroyItem(container: ViewGroup, position: Int, `object`: Any) {
//        super.destroyItem(container, position, `object`)
    }

    override fun setPrimaryItem(container: ViewGroup, position: Int, `object`: Any) {
        super.setPrimaryItem(container, position, `object`)
    }
}